﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PrototypPattern
{
    public abstract class Shape
    {
        private string Id;
        protected string Type;

        public abstract void Draw();

        public string GetMyType()
        {
            return Type;
        }

        public string GetId()
        {
            return Id;
        }

        public void SetId(string id)
        {
            this.Id = id;
        }

        public object Clone()
        {
            object clone = null;
            try
            {
                clone = this.MemberwiseClone();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace);
            }
            return clone;
        }
    }
}
